﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using WebAsp.DTO;

namespace WebAsp.DAL
{
    public class NewsCatDAL
    {
        public static List<NewsCatDTO> GetList()
        {
            LinQDataContext dt = new LinQDataContext();
            var query = from t in dt.newsCatGetList()
                        where t.MdiContainerID < 1
                        select new NewsCatDTO(t.CategoryID, t.Name, (int)t.MdiContainerID);
            return query.ToList();
        }
    }
}